home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Softdisk Supreme
/
Softdisk Supreme.iso
/
pc
/
DSK Files
/
0-49
/
SD013b.dsk
/
INVADERS.bas
< prev
next >
Wrap
BASIC Source File
|
2003-06-12
|
7KB
|
203 lines
1 REM INVADERS, MARK PELCZARSKI
10 GOSUB 1610
20 GOSUB 1800
30 PRINT " <PRESS ANY KEY>",: GET A$
40 HOME
50 POKE 232,0: POKE 233,64
60 CLEAR
70 DIM W%(30,4),M%(30,8)
80 C(1) = 6:C(2) = 7:C(3) = 5
90 SCALE= 1: ROT= 0
100 MX = 5
110 AD = 1
120 CH = 250
130 HGR
140 HCOLOR= 1
150 FOR I = 2 TO 30 STEP 5
160 FOR J = I TO I +1
170 FOR K = 1 TO 4
180 W%(J,K) = 2
190 DRAW 2 AT (J -1) *9 +2,133 +4 *K
200 NEXT K: NEXT J: NEXT I
210 FOR I = 3 TO 30 STEP 3
220 FOR J = 1 TO 4
230 M%(I,J) = INT( SQR( RND(1) *9 +1))
240 HCOLOR= C(M%(I,J))
250 DRAW 4 AT (I -1) *9,(J -1) *19
260 NEXT J: NEXT I
270 HCOLOR= 7:PX = INT( PDL(0) *.117)
280 XX = PDL(0) *1.055: DRAW 3 AT XX,156
290 LX = 1:LY = 4
300 HOME : VTAB 22
310 INPUT "LEVEL (1-EASIEST, TO 10-HARDEST) ? ";LE
320 HOME : VTAB 22: PRINT "SCORE","HITS"
330 MN = 0:HN = 0
340 VTAB 23: PRINT MN,HN
350 VTAB 24: PRINT "CHARGE=";CH;" ";: HTAB 1
360 HCOLOR= 0: DRAW 3 AT XX,156
370 XX = PDL(0) *1.055: HCOLOR= 7: DRAW 3 AT XX,156
380 PX = INT( PDL(0) *.117)
390 FOR I = LX TO 30
400 IF M%(I,LY) >0 THEN 490
410 NEXT
420 LY = LY -1:LX = 1: IF LY >0 THEN 360
430 FOR I = 3 TO 30 STEP 3
440 M%(I,1) = INT( SQR( RND(1) *9 +1))
450 HCOLOR= C(M%(I,1)): DRAW 4 AT (I -1) *9,0
460 NEXT
470 LE = LE +1: IF LE >10 THEN LE = 10:AD = AD +.5: IF AD >4 THEN AD = 4
480 LY = 8: GOTO 780
490 LX = I: HCOLOR= 0
500 TM = M%(LX,LY)
510 M%(LX,LY) = 0: DRAW 4 AT (LX -1) *9,(LY -1) *19
520 NY = LY + INT(AD): IF NY >8 AND LY <8 THEN NY = 8
530 IF NY >8 THEN 1190
540 NX = INT( RND(1) *5) -2 +LX
550 IF NX >30 OR NX <1 THEN 540
560 M%(NX,NY) = TM
570 HCOLOR= C(TM): DRAW 4 AT (NX -1) *9,(NY -1) *19
580 HCOLOR= 0: DRAW 3 AT XX,156
590 XX = PDL(0) *1.055: HCOLOR= 7: DRAW 3 AT XX,156
600 PX = INT( PDL(0) *.117)
610 FOR I = 1 TO 4
620 IF W%(NX,I) >0 THEN 720
630 NEXT
640 EN = 159: GOSUB 1400
650 IF NX < >PX +1 THEN 780
660 POKE 768,150: POKE 769,5: CALL 770
670 GOSUB 1550
680 HN = HN +1
690 VTAB 23: PRINT MN,HN
700 IF HN = MX THEN 1130
710 GOTO 780
720 EN = 133 +4 *I: GOSUB 1400
730 POKE 768,175: POKE 769,5: CALL 770
740 GOSUB 1550
750 HCOLOR= 0: DRAW W%(NX,I) AT (NX -1) *9 +2,EN
760 W%(NX,I) = W%(NX,I) -1
770 IF W%(NX,I) = 1 THEN HCOLOR= 1: DRAW 1 AT (NX -1) *9 +2,EN
780 REM PLAYER MOVE
790 TI = LE
800 HCOLOR= 0: DRAW 3 AT XX,156
810 XX = PDL(0) *1.055: HCOLOR= 7: DRAW 3 AT XX,156
820 PX = INT( PDL(0) *.117)
830 IF PEEK( -16287) <128 THEN 1070
840 IF CH <10 THEN 1070
850 IF CH <31 THEN FLASH
860 CH = CH -10: VTAB 24: PRINT "CHARGE=";CH;" ";: HTAB 1: NORMAL
870 IF M%(PX +1,8) >0 THEN I = 8: GOTO 1010
880 FOR I = 4 TO 1 STEP -1
890 IF W%(PX +1,I) >0 THEN 950
900 NEXT I
910 FOR I = 7 TO 1 STEP -1
920 IF M%(PX +1,I) >0 THEN 1010
930 NEXT I
940 EN = 0: GOSUB 1480: GOTO 1070
950 EN = 133 +I *4: GOSUB 1480
960 POKE 768,175: POKE 769,5: CALL 770
970 HCOLOR= 0: DRAW W%(PX +1,I) AT PX *9 +2,EN
980 W%(PX +1,I) = W%(PX +1,I) -1
990 IF W%(PX +1,I) = 1 THEN HCOLOR= 1: DRAW 1 AT PX *9 +2,EN
1000 GOTO 1070
1010 EN = I *19: GOSUB 1480
1020 POKE 768,100: POKE 769,5: CALL 770
1030 GOSUB 1550
1040 MN = MN +M%(PX +1,I) *5: VTAB 23: PRINT MN,HN
1050 M%(PX +1,I) = 0
1060 HCOLOR= 0: DRAW 4 AT PX *9,(I -1) *19
1070 TI = TI +1: IF TI <11 THEN 800
1080 IF CH <16 THEN FLASH
1090 CH = CH +5: VTAB 24: PRINT "CHARGE=";CH;" ";: HTAB 1
1100 NORMAL
1110 GOTO 360
1120 POKE 768,30: POKE 769,5: CALL 770
1130 LX = 2:TM = 1: GOTO 1190
1140 INPUT "PLAY AGAIN? ";A$
1150 IF LEFT$(A$,1) = "Y" THEN 60
1160 IF LEFT$(A$,1) < >"N" THEN 1140
1170 TEXT
1180 END
1190 FOR I = (LX -1) *9 TO PX *9 STEP 3 * SGN(PX -LX +1)
1200 HCOLOR= C(TM): DRAW 4 AT I,140
1210 HCOLOR= 0: DRAW 4 AT I,140
1220 NEXT
1230 I = PX *9
1240 FOR J = 1 TO 10
1250 HCOLOR= 0: DRAW 4 AT I,140
1260 HCOLOR= C(TM): DRAW 4 AT I,130
1270 POKE 768,50: POKE 769,5: CALL 770
1280 HCOLOR= 0: DRAW 4 AT I,130
1290 HCOLOR= C(TM): DRAW 4 AT I,140
1300 NEXT
1310 HCOLOR= 0: DRAW 3 AT XX,156
1320 HCOLOR= 7
1330 DRAW 1 AT I,156: DRAW 1 AT I +3,156
1340 POKE 768,87: POKE 769,100: CALL 770
1350 POKE 768,103: POKE 769,50: CALL 770
1360 POKE 768,78: POKE 769,50: CALL 770
1370 POKE 768,87: POKE 769,100: CALL 770
1380 POKE 768,103: POKE 769,250: CALL 770
1390 GOTO 1140
1400 HCOLOR= 5
1410 ST = (NX -1) *9 +8
1420 ST = ST +NX - INT(NX/2) *2
1430 HPLOT ST,NY *19 TO ST,EN
1440 POKE 768,20: POKE 769,5: CALL 770
1450 HCOLOR= 0
1460 HPLOT ST,NY *19 TO ST,EN
1470 RETURN
1480 HCOLOR= 6
1490 ST = 2 *( INT(XX/2)) +4
1500 HPLOT ST,156 TO ST,EN
1510 POKE 768,10: POKE 769,5: CALL 770
1520 HCOLOR= 0
1530 HPLOT ST,156 TO ST,EN
1540 RETURN
1550 FOR K = 1 TO 2
1560 FOR J = 1 TO 4
1570 SCALE= J
1580 XDRAW 5 AT ST,EN
1590 NEXT J: NEXT K
1600 SCALE= 1: RETURN
1610 HOME
1620 PRINT " WELCOME TO INVADERS"
1630 PRINT " MP SOFTWARE, 1980"
1640 PRINT : PRINT "THE ALIENS ARE COMING! THE OBJECT IS TO";
1650 PRINT "SHOOT AS MANY AS YOU CAN BEFORE THEY"
1660 PRINT "SHOOT YOU 5 TIMES OR REACH YOUR BATTLE"
1670 PRINT "STATION."
1680 PRINT : PRINT "IN THIS MAMMOTH LASER BATTLE YOU USE"
1690 PRINT "THE GAME PADDLE TO MOVE AND THE BUTTON"
1700 PRINT "TO FIRE YOUR LASER."
1710 PRINT : PRINT "YOU START WITH 250 CHARGE UNITS, AND"
1720 PRINT "EACH TIME YOU FIRE 10 UNITS ARE USED."
1730 PRINT "THE LASER CONSTANTLY RECHARGES ITSELF."
1740 PRINT : PRINT "BLUE MARTIANS ARE WORTH 5 POINTS, WHITE"
1750 PRINT "MARTIANS ARE WORTH 10 POINTS, AND RED"
1760 PRINT "MARTIANS ARE WORTH 15 POINTS EACH. IF"
1770 PRINT "YOU ARE USING A BLACK AND WHITE TV, FAKE";
1780 PRINT "IT....": PRINT
1790 RETURN
1800 L = 770: GOSUB 1870
1810 L = 16384
1820 FOR MX = 1 TO 9: GOSUB 1870: NEXT MX
1830 RETURN
1870 READ A$
1880 FOR I = 1 TO LEN(A$) STEP 2
1890 AD = ASC( MID$ (A$,I,1)) -48
1900 IF AD >9 THEN AD = AD -7
1910 CH = ASC( MID$ (A$,I +1,1)) -48
1920 IF CH >9 THEN CH = CH -7
1930 POKE L,AD *16 +CH
1940 L = L +1: NEXT I
1950 RETURN
1960 DATA "AD30C088D005CE0103F009CAD0F5AE00034C020360"
1970 DATA "05000C00210036004700EA00"
1980 DATA "0D090909111B3B1B1B1309090929311B1B3B3B1300"
1990 DATA "2D2D2D2D353F3F3F3F372D2D2D2D353F3F3F3F3700"
2000 DATA "09290D111B3B1F132D2D2D353F3F3F3700"
2010 DATA "09092D2D292D0D09111B1B1B3B1F3F1B1B130909092D2D0D0909111B1B3F3F3F3F3F1B1309292D2D2D2D2D0D"
2020 DATA "111B3F3F1B3B1B3B3F13292D2D090D292D2D153F3F3F3F3F3F3F3F37292D2D2D292D2D2D151B3F3F3F3F3F3F3F"
2030 DATA "1309292D0909092D0D111B1B3F3B3F1F3F1B13292D2D2D2D2D2D2D153B1F1B3F1B3F1B3B17290D092D092D"
2040 DATA "0929151B1B1B3F1B3F1B1B130909092D092D0909111B3F3F3F1B3F3F1F1300"
2050 DATA "363F24272C253C2C2D2E2E3E372E3E00"